package com.timoon.webcomponent.utility.product.single.component;

import org.apache.wicket.markup.html.basic.Label;

import com.timoon.sample.dao.model.Product;
import com.timoon.sample.dao.model.ProductComment;
import com.timoon.webcomponent.utility.product.BaseProductPanel;

/**
 *<p>单独一个评论</p>
 *<p></p>
 *<p>Copyright:Copyright(c)2013.4.1</p>
 *<p>Company:timoon</p>
 *@author 付乐天
 *@version 1.0 */
public class ProductSingleCommentPanel extends BaseProductPanel {

	private ProductComment comment;
	
	private Product product;
	
	public ProductSingleCommentPanel(String id,ProductComment comment) {
		super(id);
		// TODO Auto-generated constructor stub
		
		this.comment=comment;
		
		renderPanel();
	}
	
	public ProductSingleCommentPanel(String id,Product product) {
		super(id);
		// TODO Auto-generated constructor stub
		
		this.product=product;
		
		renderPanel();
	}

	private void renderPanel() {
		// TODO Auto-generated method stub
		
		renderLevel();
		
		renderAdvantage();
		
		renderDisadvantage();
		
		renderDate();
	}

	private void renderDate() {
		// TODO Auto-generated method stub
		add(new Label("wk_date",this.comment.getCreateDate()));
	}

	private void renderDisadvantage() {
		// TODO Auto-generated method stub
		add(new Label("wk_advantage",this.comment.getAdvantage()));
	}

	private void renderAdvantage() {
		// TODO Auto-generated method stub
		add(new Label("wk_disadvantage",this.comment.getDisadvantage()));
	}

	private void renderLevel() {
		// TODO Auto-generated method stub
		
	}

}
